import { request } from '@/api/service'
import qs from 'qs'
const headers = { 'content-type': 'application/x-www-form-urlencoded' }

// ----------设置部分

// 新增时段
export function addTimeslot (name) {
  return request({
    method: 'post',
    url: '/setup/addTimesLot',
    data: qs.stringify({ name: name }),
    headers
  })
}

// 修改时段
export function updateTimeslot (data) {
  return request({
    method: 'post',
    url: '/setup/updateTimesLot',
    data: qs.stringify(data),
    headers
  })
}

// 删除时段
// eslint-disable-next-line camelcase
export function deleteTimeslot (timeslot_id) {
  return request({
    method: 'post',
    url: '/setup/deleteTimesLot',
    data: qs.stringify({ timeslot_id: timeslot_id }),
    headers
  })
}

// 新增专家
export function addExpert (name) {
  return request({
    method: 'post',
    url: '/setup/addExpert',
    data: qs.stringify({ name: name }),
    headers
  })
}

// 删除专家
// eslint-disable-next-line camelcase
export function deleteExpert (experts_id) {
  return request({
    method: 'post',
    url: '/setup/deleteExpert',
    data: qs.stringify({ experts_id: experts_id }),
    headers
  })
}

// 修改密码
export function updateUserPassword (data) {
  return request({
    method: 'post',
    url: '/setup/updatePassWord',
    data: qs.stringify(data),
    headers
  })
}

// 修改个人信息
export function updateUserInfo (data) {
  return request({
    method: 'post',
    url: '/setup/updateUserInfo',
    data: qs.stringify(data),
    headers
  })
}

export function getApplyjobList (params) {
  return request({
    url: 'job/getAppllyjobList/',
    params: params
  })
}
//
//
